#pragma once
#include "DXAMLCommon.h"




#include "IMediaServices.h"
#include "CClassInfo.h"
#include "IErrorService.h"
#include "Xcp_IDependencyObject.h"
#include "IPALResourceManager.h"
#include "ICoreRenderTarget.h"
#include "IPALCrossDomainPolicyFactory.h"
#include "Xcp_IAutomationPeer.h"
#include "IXcpHostSite.h"
#include "IPALGraphicsDeviceManager.h"
#include "ICoreCompositorScheduler.h"
#include "ITickableFrameScheduler.h"
#include "IPALPresentTarget.h"
#include "IHwndHost.h"
#include "IPALExecuteOnUIThread.h"
#include "IPALAsyncImageFactory.h"
#include "ICoreServicesSite.h"
#include "IPALDownloadRequest.h"
#include "IPALAbortableOperation.h"
#include "IValueStore.h"
#include "IPALUri.h"
#include "IXcpDispatcher.h"
#include "CBrush.h"
#include "CSolidColorBrush.h"
#include "CSurfaceImageSource.h"
#include "CVirtualSurfaceImageSource.h"
#include "CApplication.h"
#include "IScriptObject.h"
#include "RangeRequestData.h"
#include "Xcp_IDependencyObject.h"


class CValue;
typedef HRESULT (__stdcall * PFNScriptCallbackA)(Xcp_IDependencyObject *, Xcp_IDependencyObject *);
typedef HRESULT (__stdcall *PFNScriptCallback)(void *, Xcp_IDependencyObject *, Xcp_IDependencyObject *, CXString *, int, IScriptObject *, PFNScriptCallbackA *);


struct ICoreServices :
	public IMediaServices
{
public: 
	/*0011 0x00000008 +00000044*/ virtual XUINT8                          IsCoreReady() = 0;
	/*0012 0x0000000C +00000048*/ virtual HRESULT                         RegisterScriptCallback(void * pControl, PFNScriptCallback  * pfnAsync, PFNScriptCallback  * pfnSync) = 0;
	/*0013 0x0000000D +00000052*/ virtual HRESULT                         ColorFromString(XUINT32 cString, XCHAR * pString, XUINT32 *prgbResult) = 0;
	/*0014 0x0000000E +00000056*/ virtual void                            ForceGCCollect() = 0;
	/*0015 0x0000000F +00000060*/ virtual CClassInfo *                    GetClassInfoByName( XUINT32 cName, const XCHAR * pName) = 0;
	/*0016 0x00000010 +00000064*/ virtual CDependencyProperty *           GetContentProperty(CClassInfo * pClass) = 0;
	/*0017 0x00000011 +00000068*/ virtual CDependencyProperty *           GetPropertyByName(CClassInfo *pClass, XUINT32 cName, const XCHAR * pName, XBOOL bUpperCamelCase) = 0;
	/*0018 0x00000012 +00000072*/ virtual CDependencyProperty *           GetPropertyByIndex(CClassInfo *pClass, XUINT32 nIndex) = 0;
	/*0019 0x00000013 +00000076*/ virtual HRESULT                         CheckMethodCValueArguments(CClassInfo *pClass, XCHAR * pName, XUINT32 argCount, CValue *pValue, XBOOL bUpperCamelCase) = 0;
	/*0020 0x00000014 +00000080*/ virtual HRESULT                         CreateErrorService(struct IErrorService **ppObject) = 0;
	/*0021 0x00000015 +00000084*/ virtual HRESULT                         GetElementByName(XUINT32 cName, const XCHAR * pName, Xcp_IDependencyObject *pReferenceObject, Xcp_IDependencyObject **ppIDO) = 0;
	/*0022 0x00000016 +00000088*/ virtual HRESULT                         CreateObject(CClassInfo *pClass, XUINT32 cString, XCHAR * pString, Xcp_IDependencyObject **ppDO) = 0;
	/*0023 0x00000017 +00000092*/ virtual HRESULT                         GetResourceManager(struct IPALResourceManager **ppResourceManager) = 0;
	/*0024 0x00000018 +00000096*/ virtual HRESULT                         LoadXaml(XUINT32 cBuffer, XUINT8 *pBuffer, Xcp_IDependencyObject **ppDependencyObject) = 0;

	/*0025 0x00000019 +00000100*/ virtual HRESULT                         ParseXaml(XUINT32 cBuffer, 
																				XUINT8 *pBuffer, 
																				XBOOL bCreatePermanentNamescope, 
																				XBOOL bRequiresDefaultNamespace, 
																				XBOOL bAllowEventHandlers, 
																				Xcp_IDependencyObject **ppDependencyObject, 
																				XUINT32 cSourceAssemblyName, 
																				XCHAR * pSourceAssemblyName, 
																				XBOOL bExpandTemplatesDuringParse, 
																				XUINT32 cXamlResourceUriStringCount, 
																				XCHAR * pXamlResourceUriString, 
																				XBOOL bIsBinaryContent) = 0;

	/*0026 0x0000001A +00000104*/ virtual HRESULT                         ParseXamlWithEventRoot(XUINT32 cBuffer, 
																				XUINT8 *pBuffer, 
																				XBOOL bCreatePermanentNamescope, 
																				XBOOL bRequireDefaultNamespace, 
																				XBOOL bAllowEventHandlers, 
																				Xcp_IDependencyObject *pEventRoot, 
																				Xcp_IDependencyObject **ppDependencyObject, 
																				Xcp_IDependencyObject *pTemplatedParent, 
																				XBOOL bRegisterNamesInTemplateNamescope, 
																				IValueStore *pResourcesForOriginalScope, 
																				IPALUri *pXamlResourceUri, 
																				XUINT32 cSourceAssemblyName, 
																				XCHAR * pSourceAssemblyName, 
																				XBOOL bExpandTemplatesDuringParse, 
																				XBOOL bIsBinaryContent) = 0;

	/*0027 0x0000001B +00000108*/ virtual HRESULT                         ParseXamlWithExistingFrameworkRoot(XUINT32 cBuffer, 
																				XUINT8 *pBuffer, 
																				XBOOL bCreatePermanentNamescope, 
																				Xcp_IDependencyObject *m_pExistingFrameworkRoot, 
																				XUINT32 cAssemblyStrCount, 
																				XCHAR * pAssemblyStr, 
																				XUINT32 cXamlResourceUriStrCount, 
																				XCHAR * pXamlResourceUriStr, 
																				Xcp_IDependencyObject **ppDependencyObject, 
																				XBOOL bAllowCoreExistingFrameworkRoot) = 0;

	/*0028 0x0000001C +00000112*/ virtual HRESULT                         ResetVisualTree() = 0;
	/*0029 0x0000001D +00000116*/ virtual XBOOL                           IsShuttingDown() = 0;
	/*0030 0x0000001E +00000120*/ virtual void                            SetShuttingDown(XBOOL bState) = 0;
	/*0031 0x0000001F +00000124*/ virtual HRESULT                         putVisualRoot(struct Xcp_IDependencyObject * pDependencyObject) = 0;
	/*0032 0x00000020 +00000128*/ virtual struct Xcp_IDependencyObject *  getVisualRoot() = 0;
	/*0033 0x00000021 +00000132*/ virtual struct Xcp_IDependencyObject *  getRootScrollViewer() = 0;
	/*0034 0x00000022 +00000136*/ virtual void                            NotifyMEforOutputProtection(struct Xcp_IDependencyObject * pRoot) = 0;
	/*0035 0x00000023 +00000140*/ virtual HRESULT                         getErrorService(struct IErrorService * * ppErrorService) = 0;
	/*0036 0x00000024 +00000144*/ virtual HRESULT                         ReportUnhandledError(HRESULT errorXR) = 0;
	/*0037 0x00000025 +00000148*/ virtual HRESULT                         putBackgroundColor(XUINT32 uBackgroundColor) = 0;
	/*0038 0x00000026 +00000152*/ virtual HRESULT                         putEnableRedrawRegions(int fEnableRedrawRegions) = 0;
	/*0039 0x00000027 +00000156*/ virtual XINT32                          getEnableRedrawRegions() = 0;
	/*0040 0x00000028 +00000160*/ virtual HRESULT                         NWDrawMainTree(struct ICoreRenderTarget * pIRenderTarget, 
																				XBOOL fForceRedraw, 
																				XBOOL needsToReleaseHardwareResources, 
																				struct XRECT_WH * prcDirtyRect) = 0;

	/*0041 0x00000029 +00000164*/ virtual HRESULT                         Tick(XBOOL tickForDrawing) = 0;
	/*0042 0x0000002A +00000168*/ virtual HRESULT                         CallPerFrameCallback(XFLOAT time) = 0;

	/*0043 0x0000002B +00000172*/ virtual HRESULT                         HitTest(struct XPOINTF ptHit, 
																				struct Xcp_IDependencyObject * pHitTestRoot, 
																				struct Xcp_IDependencyObject * * ppVisualHit, 
																				HWND hWindowID) = 0;
	/*0044 0x0000002C +00000176*/ virtual HRESULT                         HitTestHyperlinkFromRichTextBox(struct XPOINTF ptHit, 
																				struct Xcp_IDependencyObject * pHyperlinkContainer, 
																				struct Xcp_IDependencyObject * * ppHyperlink) = 0;

	/*0045 0x0000002D +00000180*/ virtual HRESULT                         ProcessInput(struct InputMessage * pMessage, int * fHandled, HWND hWindowID) = 0;
	/*0046 0x0000002E +00000184*/ virtual HRESULT                         ProcessDragDrop(struct DragMsg * pMessage, int * pHandled) = 0;
	/*0047 0x0000002F +00000188*/ virtual HRESULT                         ProcessTouchInteractionCallback(struct Xcp_IDependencyObject * pElement, struct TouchInteractionMsg * pMessage) = 0;
	/*0048 0x00000030 +00000192*/ virtual void                            RegisterHostSite(struct IXcpHostSite * pHostSite) = 0;
	/*0049 0x00000031 +00000196*/ virtual void                            UnregisterHostSite() = 0;
	/*0050 0x00000032 +00000200*/ virtual HRESULT                         RegisterBrowserHost(struct IXcpBrowserHost * pBrowserHost) = 0;
	/*0051 0x00000033 +00000204*/ virtual HRESULT                         UnregisterBrowserHost() = 0;
	/*0052 0x00000034 +00000208*/ virtual HRESULT                         RegisterDownloadSite(struct ICoreServicesSite * pSite) = 0;
	/*0053 0x00000035 +00000212*/ virtual void                            UnregisterDownloadSite() = 0;
	/*0054 0x00000036 +00000216*/ virtual HRESULT                         UnsecureHTTPRequestFromSite(struct IPALDownloadRequest * pRequest, struct IPALAbortableOperation * * ppIAbortableDownload) = 0;
	/*0055 0x00000037 +00000220*/ virtual HRESULT                         GetSystemGlyphTypefaces(struct Xcp_IDependencyObject * * ppDo) = 0;
	/*0056 0x00000038 +00000224*/ virtual HRESULT                         CreateValueStore(struct IValueStore * * ppValueStore, XINT32 bObjectBase) = 0;
	/*0057 0x00000039 +00000228*/ virtual HRESULT                         EnsureResourceDictionaryUriCache(struct IValueStore * * ppRDUriCache) = 0;
	/*0058 0x0000003A +00000232*/ virtual void                            CLR_UseCustomAppDomain(void *) = 0;
	/*0059 0x0000003B +00000236*/ virtual XBOOL                           CLR_IsAppDomainWithoutSecuritySandboxAllowed() = 0;
	/*0060 0x0000003C +00000240*/ virtual HRESULT                         CLR_Startup(XBOOL fIsXap) = 0;
	/*0061 0x0000003D +00000244*/ virtual void                            CLR_Shutdown() = 0;
	/*0062 0x0000003E +00000248*/ virtual HRESULT                         CLR_FireEvent(struct Xcp_IDependencyObject * pSender, struct Xcp_IDependencyObject * pe, XCHAR * pName, XUINT32 flags) = 0;
	/*0063 0x0000003F +00000252*/ virtual XCHAR *                          CLR_GetNamespace(struct Xcp_IDependencyObject * pDO) = 0;
	/*0064 0x00000040 +00000256*/ virtual HRESULT                         CLR_GetScriptableObjectID( XCHAR * pName, XUINT32 *pID) = 0;
	/*0065 0x00000041 +00000260*/ virtual HRESULT                         CLR_GetScriptableObjectFromID(XUINT32 Id, void **ppScriptObject) = 0;
	/*0066 0x00000042 +00000264*/ virtual HRESULT                         CLR_AsyncReleaseNativeObject(struct IManagedInteropObject * pObj) = 0;

	/*0067 0x00000043 +00000268*/ virtual HRESULT                         ShouldFireEvent(struct Xcp_IDependencyObject * pSender, 
																				struct Xcp_IDependencyObject * pe, 
																				const CXString * pstrName, 
																				XINT32 , 
																				XINT32 * pfShouldFire) = 0;

	/*0068 0x00000044 +00000272*/ virtual HRESULT                         DeploymentComplete() = 0;
	/*0069 0x00000045 +00000276*/ virtual HRESULT                         ApplicationStartupEventComplete() = 0;
	/*0070 0x00000046 +00000280*/ virtual HRESULT                         StartDeploymentTree(struct Xcp_IDependencyObject * pDeploymentObject) = 0;
	/*0071 0x00000047 +00000284*/ virtual HRESULT                         CreateSourceDownloadEventArgs(XFLOAT fValue, struct Xcp_IDependencyObject * * ppEventArgs) = 0;
	/*0072 0x00000048 +00000288*/ virtual HRESULT                         EnumToString(CDependencyProperty * pdp, CValue * pValue) = 0;
	/*0073 0x00000049 +00000292*/ virtual XUINT32                         GetIdentity() = 0;
	/*0074 0x0000004A +00000296*/ virtual void                            DebugSetZoom( XINT32 nPixelX, XINT32 nPixelY, XFLOAT rZoomFactor) = 0;
	/*0075 0x0000004B +00000300*/ virtual XFLOAT                          GetZoomScale() = 0;
	/*0076 0x0000004C +00000304*/ virtual void                            FireAccessibilityAction(struct Xcp_IDependencyObject * pObject) = 0;
	/*0077 0x0000004D +00000308*/ virtual void                            SetCanTabOutOfPlugin(XBOOL bCanTabOutOfPlugin) = 0;
	/*0078 0x0000004E +00000312*/ virtual XBOOL                           IsPluginFocused() = 0;
	/*0079 0x0000004F +00000316*/ virtual void                            ClearFocus() = 0;
	/*0080 0x00000050 +00000320*/ virtual HRESULT                         CreatePolicyFileFactory(struct IPALCrossDomainPolicyFactory * * ppPolicyFactory) = 0;
	/*0081 0x00000051 +00000324*/ virtual void                            SetValueFromManaged(struct Xcp_IDependencyObject *) = 0;
	/*0082 0x00000052 +00000328*/ virtual XBOOL                           IsSettingValueFromManaged(struct Xcp_IDependencyObject * pdo) = 0;
	/*0083 0x00000053 +00000332*/ virtual XBOOL                           HasActiveAnimations() = 0;
	/*0084 0x00000054 +00000336*/ virtual void                            SetAllowTransitionTargetCreation(XBOOL v) = 0;
	/*0085 0x00000055 +00000340*/ virtual XBOOL                           IsAllowingTransitionTargetCreations() = 0;
	/*0086 0x00000056 +00000344*/ virtual struct Xcp_IDependencyObject *  GetFocusedElement() = 0;
	/*0087 0x00000057 +00000348*/ virtual struct Xcp_IAutomationPeer *    GetFocusedAutomationPeer() = 0;
	/*0088 0x00000058 +00000352*/ virtual void                            SetFocusedAutomationPeer(struct Xcp_IAutomationPeer * pAP) = 0;
	/*0089 0x00000059 +00000356*/ virtual HRESULT                         CreateCompositorScheduler(struct IPALGraphicsDeviceManager * pIGraphicsDeviceManager,
																				struct ICoreCompositorScheduler * * ppICompositorScheduler) = 0;
	/*0090 0x0000005A +00000360*/ virtual HRESULT                         CreateUIThreadScheduler(struct IXcpDispatcher * pIDispatcher, 
																				struct ICoreCompositorScheduler * pICompositorScheduler, 
																				struct ITickableFrameScheduler * * ppUIThreadScheduler) = 0;
	/*0091 0x0000005B +00000364*/ virtual HRESULT                         CreateWindowRenderTarget(struct IPALGraphicsDeviceManager * pIGraphicsDeviceManager, 
																				struct ICoreCompositorScheduler * pICompositorScheduler, 
																				struct IPALPresentTarget * pIInitialPresentTarget) = 0;
	/*0092 0x0000005C +00000368*/ virtual HRESULT                         GetAppVersion(XUINT32 * puMajorVersion, XUINT32 * puMinorVersion, XUINT32 * puBuildNumber, XUINT32 * puRevisionNumber) = 0;
	/*0093 0x0000005D +00000372*/ virtual XUINT8                          IsNativeHosted() = 0;
	/*0094 0x0000005E +00000376*/ virtual HRESULT                         ForceIncreaseQuota(XUINT64 ) = 0;
	/*0095 0x0000005F +00000380*/ virtual XBOOL                           ShouldForceIncreaseQuota() = 0;
	/*0096 0x00000060 +00000384*/ virtual XBOOL                           IsHwndHostingEnabled() = 0;
	/*0097 0x00000061 +00000388*/ virtual HRESULT                         RegisterHwndHost(struct IHwndHost * pHwndHost) = 0;
	/*0098 0x00000062 +00000392*/ virtual HRESULT                         UnregisterHwndHost(struct IHwndHost * pHwndHost) = 0;
	/*0099 0x00000063 +00000396*/ virtual HRESULT                         GetHwndHostedAt(struct XPOINTF pt, void * * pHwnd, struct XPOINTF * pptHwndOrigin) = 0;
	/*0100 0x00000064 +00000400*/ virtual HRESULT                         ResizeHwndHostsToFitPlugin() = 0;
	/*0101 0x00000065 +00000404*/ virtual HRESULT                         TranslateAcceleratorW(void * pMsg, XBOOL & bHandled) = 0;
	/*0102 0x00000066 +00000408*/ virtual HRESULT                         ExecuteOnUIThread(struct IPALExecuteOnUIThread * pExecutor, XBOOL fAllowReentrancy) = 0;
	/*0103 0x00000067 +00000412*/ virtual HRESULT                         SetAppVersion(XUINT32 uMajorVersion, XUINT32 uMinorVersion) = 0;
	/*0104 0x00000068 +00000416*/ virtual HRESULT                         GetImageFactory(struct IPALAsyncImageFactory * * ppFactory) = 0;
	/*0105 0x00000069 +00000420*/ virtual XBOOL                           IsInDesignMode() = 0;
	/*0106 0x0000006A +00000424*/ virtual void                            SetIsInDesignMode(XBOOL bState) = 0;
	/*0107 0x0000006B +00000428*/ virtual HRESULT                         CheckForRenderThreadFailureAndRecover() = 0;
	/*0108 0x0000006C +00000432*/ virtual XBOOL                           IsRightAngleRotated() = 0;
	/*0109 0x0000006D +00000436*/ virtual void                            SetDisplayRotation(enum DisplayRotation displayRotation) = 0;
	/*0110 0x0000006E +00000440*/ virtual void                            SetSizeChangedNotification(XUINT32 value, XUINT32 applicationViewState) = 0;
	/*0111 0x0000006F +00000444*/ virtual XBOOL                           GetWindowVisibility() = 0;
	/*0112 0x00000070 +00000448*/ virtual HRESULT                         SetWindowVisibility(XBOOL value, XBOOL isStartingUp) = 0;

	/*102*/

};
